// 友链管理页面样式
@use '../variables' as *;
.friend-list {
    .sample-data-notice {
        margin-bottom: 24px;
    }
    .page-header {
        background: white;
        border-radius: $radius-lg;
        padding: 24px;
        margin-bottom: 24px;
        box-shadow: $shadow-md;
        display: flex;
        justify-content: space-between;
        align-items: center;
        .page-title {
            margin: 0;
            font-size: 1.5rem;
            font-weight: $font-bold;
            color: $text-primary;
        }
    }
    // 统计信息卡片样式
    .stats-section {
        margin-bottom: 24px;
        .stat-card {
            background: white;
            border-radius: $radius-lg;
            padding: 20px;
            box-shadow: $shadow-md;
            display: flex;
            align-items: center;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            &:hover {
                transform: translateY(-2px);
                box-shadow: $shadow-lg;
            }
            .stat-icon {
                width: 60px;
                height: 60px;
                border-radius: 50%;
                display: flex;
                align-items: center;
                justify-content: center;
                margin-right: 16px;
                font-size: 24px;
                color: white;
                &.friends-icon {
                    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
                }
                &.active-icon {
                    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
                }
                &.pending-icon {
                    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
                }
                &.total-icon {
                    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
                }
            }
            .stat-content {
                flex: 1;
                .stat-number {
                    font-size: 2rem;
                    font-weight: $font-bold;
                    color: $text-primary;
                    line-height: 1;
                    margin-bottom: 4px;
                }
                .stat-label {
                    font-size: 0.9rem;
                    color: $text-secondary;
                }
            }
        }
    }
    .filter-section {
        display: flex;
        gap: 16px;
        margin-bottom: 24px;
        .search-input {
            width: 300px;
        }
        .el-select {
            width: 150px;
        }
    }
    .friend-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 20px;
        .friend-card {
            background: white;
            border-radius: 8px;
            padding: 20px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            &:hover {
                transform: translateY(-2px);
                box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
            }
            .friend-header {
                display: flex;
                align-items: center;
                margin-bottom: 12px;
                .friend-logo {
                    width: 40px;
                    height: 40px;
                    border-radius: 50%;
                    margin-right: 12px;
                    object-fit: cover;
                }
                .friend-info {
                    flex: 1;
                    .friend-name {
                        margin: 0 0 4px 0;
                        font-size: 1.1rem;
                        font-weight: 600;
                    }
                    .friend-url {
                        margin: 0;
                        color: #666;
                        font-size: 0.9rem;
                    }
                }
            }
            .friend-description {
                margin: 0 0 12px 0;
                color: #555;
                line-height: 1.5;
            }
            .friend-meta {
                display: flex;
                justify-content: space-between;
                align-items: center;
                margin-bottom: 16px;
                .friend-date {
                    color: #999;
                    font-size: 0.9rem;
                }
            }
            .friend-actions {
                display: flex;
                gap: 8px;
            }
        }
    }
    // 友链申请列表样式
    .application-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 20px;
        .application-card {
            background: white;
            border-radius: 8px;
            padding: 20px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            &:hover {
                transform: translateY(-2px);
                box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
            }
            .application-header {
                display: flex;
                align-items: center;
                margin-bottom: 12px;
                .application-logo {
                    width: 40px;
                    height: 40px;
                    border-radius: 50%;
                    margin-right: 12px;
                    object-fit: cover;
                }
                .application-info {
                    flex: 1;
                    .application-name {
                        margin: 0 0 4px 0;
                        font-size: 1.1rem;
                        font-weight: 600;
                    }
                    .application-url {
                        margin: 0;
                        color: #666;
                        font-size: 0.9rem;
                    }
                }
            }
            .application-description {
                margin: 0 0 12px 0;
                color: #555;
                line-height: 1.5;
            }
            .application-meta {
                display: flex;
                flex-wrap: wrap;
                gap: 8px;
                align-items: center;
                margin-bottom: 16px;
                .application-date {
                    color: #999;
                    font-size: 0.9rem;
                }
                .applicant-info {
                    color: #666;
                    font-size: 0.9rem;
                }
            }
            .application-actions {
                display: flex;
                gap: 8px;
                margin-bottom: 12px;
            }
            .application-processed {
                display: flex;
                align-items: center;
                gap: 12px;
                .process-time {
                    color: #999;
                    font-size: 0.9rem;
                }
            }
        }
    }
    // 申请详情对话框样式
    .application-detail {
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
        border-radius: 12px;
        padding: 24px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        .detail-section {
            margin-bottom: 24px;
            .section-title {
                font-size: 1.1rem;
                font-weight: 600;
                color: $text-primary;
                margin: 0 0 16px 0;
                padding-bottom: 8px;
                border-bottom: 2px solid #f0f0f0;
                display: flex;
                align-items: center;
                gap: 8px;
                .el-icon {
                    color: #409eff;
                    font-size: 1.2rem;
                }
            }
            .info-grid {
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
                gap: 16px;
                .info-item {
                    display: flex;
                    flex-direction: column;
                    label {
                        font-weight: 500;
                        color: $text-secondary;
                        margin-bottom: 4px;
                        font-size: 0.9rem;
                    }
                    span {
                        color: $text-primary;
                        font-size: 1rem;
                        &.site-name {
                            font-weight: 600;
                            color: #2c3e50;
                            font-size: 1.1rem;
                        }
                        &.time-value {
                            color: #409eff;
                            font-weight: 500;
                        }
                        &.process-note {
                            color: #67c23a;
                            font-weight: 500;
                            background: #f0f9ff;
                            padding: 4px 8px;
                            border-radius: 4px;
                            border-left: 3px solid #67c23a;
                        }
                    }
                    .url-link {
                        color: #409eff;
                        text-decoration: none;
                        &:hover {
                            text-decoration: underline;
                        }
                    }
                    .category-tag {
                        font-weight: 500;
                        border-radius: 12px;
                        padding: 4px 12px;
                    }
                    .status-tag {
                        font-weight: 500;
                        border-radius: 12px;
                        padding: 4px 12px;
                    }
                }
            }
            .description-content,
            .message-content {
                background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
                padding: 20px;
                border-radius: 8px;
                color: $text-primary;
                line-height: 1.6;
                border-left: 4px solid #409eff;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
                position: relative;
                &::before {
                    content: '';
                    position: absolute;
                    top: 0;
                    right: 0;
                    width: 40px;
                    height: 40px;
                    background: linear-gradient(135deg, transparent 50%, rgba(64, 158, 255, 0.1) 50%);
                    border-radius: 0 8px 0 0;
                }
            }
            .logo-preview {
                text-align: center;
                padding: 20px;
                background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
                border-radius: 8px;
                border: 2px dashed #dee2e6;
                .preview-logo {
                    max-width: 120px;
                    max-height: 120px;
                    border-radius: 12px;
                    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
                    transition: transform 0.3s ease, box-shadow 0.3s ease;
                    &:hover {
                        transform: scale(1.05);
                        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
                    }
                }
            }
        }
    }
    // 自定义分类相关样式
    .category-container {
        .custom-category-section {
            margin-top: 16px;
            padding: 16px;
            background: #f8f9fa;
            border-radius: 6px;
            border: 1px solid #e9ecef;
            .section-title {
                font-size: 14px;
                color: #495057;
                margin-bottom: 12px;
                font-weight: 500;
            }
            .custom-category-input {
                display: flex;
                align-items: center;
                margin-bottom: 16px;
            }
            .custom-categories-list {
                .list-title {
                    font-size: 13px;
                    color: #6c757d;
                    margin-bottom: 8px;
                }
                .categories-tags {
                    display: flex;
                    flex-wrap: wrap;
                    gap: 8px;
                    .category-tag {
                        cursor: pointer;
                        transition: all 0.2s ease;
                        &:hover {
                            transform: scale(1.05);
                        }
                    }
                }
            }
        }
    }
}

// 响应式设计
@media (max-width: 1200px) {
    .friend-list {
        .friend-grid,
        .application-list {
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        }
        .stats-section {
            .stat-card {
                .stat-icon {
                    width: 50px;
                    height: 50px;
                    font-size: 20px;
                }
                .stat-content {
                    .stat-number {
                        font-size: 1.5rem;
                    }
                }
            }
        }
    }
}

@media (max-width: 768px) {
    .friend-list {
        .page-header {
            flex-direction: column;
            gap: 16px;
            align-items: flex-start;
        }
        .stats-section {
            .el-row {
                .el-col {
                    margin-bottom: 16px;
                }
            }
            .stat-card {
                padding: 16px;
                .stat-icon {
                    width: 50px;
                    height: 50px;
                    font-size: 18px;
                    margin-right: 12px;
                }
                .stat-content {
                    .stat-number {
                        font-size: 1.3rem;
                    }
                }
            }
        }
        .filter-section {
            flex-direction: column;
            align-items: stretch;
            .search-input,
            .el-select {
                width: 100%;
            }
        }
        .friend-grid,
        .application-list {
            grid-template-columns: 1fr;
            gap: 16px;
        }
        .friend-card,
        .application-card {
            padding: 16px;
            .friend-header,
            .application-header {
                .friend-logo,
                .application-logo {
                    width: 40px;
                    height: 40px;
                    margin-right: 12px;
                }
                .friend-info,
                .application-info {
                    .friend-name,
                    .application-name {
                        font-size: 1.1rem;
                    }
                }
            }
        }
        .application-detail {
            .detail-section {
                .info-grid {
                    grid-template-columns: 1fr;
                    gap: 12px;
                }
            }
        }
    }
}

@media (max-width: 480px) {
    .friend-list {
        .stats-section {
            .stat-card {
                flex-direction: column;
                text-align: center;
                .stat-icon {
                    margin: 0 0 12px 0;
                }
            }
        }
        .friend-card,
        .application-card {
            .friend-actions,
            .application-actions {
                flex-direction: column;
                gap: 8px;
                .el-button {
                    width: 100%;
                }
            }
        }
    }
}